from PIL import Image

# 打开图片
image = Image.open('input.png')

# 调整尺寸
width, height = image.size
new_width = int(width * 0.5)
new_height = int(height * 0.5)
resized_image = image.resize((new_width, new_height))

# 保存处理后的图片
resized_image.save('output.jpg')
